package com.bit.ioc.controller;

import com.bit.ioc.model.Person;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Controller
public class YmlController {
    @Value("${my.key1}")
    private String myKey1;
    @Value("${my.key2}")
    private Integer myKey2;

    @Autowired
    private Person person;
    @PostConstruct
    public void init(){
        System.out.println(myKey1);
        System.out.println();
        System.out.println("person"+person);
    }
}
